package bairui.international.controller.index.module;

import com.sh_lianjing.spring.web.controller.enhance.module.*;
import com.sh_lianjing.spring.web.controller.enhance.module.body.*;
import com.sh_lianjing.spring.web.controller.enhance.output.bean.*;
import bairui.international.controller.index.module.C_Index_Module_Edit_EditAccess;
import bairui.international.controller.index.module.product.C_Index_Module_Product_AddProduct_PageAccess;
import bairui.international.controller.index.module.image.C_Index_Module_Image_AddImage_FileUpload;
import bairui.international.controller.index.module.C_Index_Module_Delete_Delete;
import bairui.international.controller.index.module.C_Index_Module_Publish_Submit;
import bairui.international.controller.index.module.C_Index_Module_Up_Submit;
import bairui.international.controller.index.module.C_Index_Module_Down_Submit;

/**
 *
 * Module_Info
 *
 */
class Module_Info{

	
	/**
	 * 信息模块
	 */
	public Module module(
		Module_Info_OutputModel bean, 
		C_Index_Module_Edit_EditAccess.EditAccess.Operate c_Index_Module_Edit_EditAccess_EditAccess_Operate
	,	C_Index_Module_Product_AddProduct_PageAccess.PageAccess.Operate c_Index_Module_Product_AddProduct_PageAccess_PageAccess_Operate
	,	C_Index_Module_Image_AddImage_FileUpload.FileUpload.Operate c_Index_Module_Image_AddImage_FileUpload_FileUpload_Operate
	,	C_Index_Module_Delete_Delete.Delete.Operate c_Index_Module_Delete_Delete_Delete_Operate
	,	C_Index_Module_Publish_Submit.Submit.Operate c_Index_Module_Publish_Submit_Submit_Operate
	,	C_Index_Module_Up_Submit.Submit.Operate c_Index_Module_Up_Submit_Submit_Operate
	,	C_Index_Module_Down_Submit.Submit.Operate c_Index_Module_Down_Submit_Submit_Operate
	){
		return
			new Module(
					new ModuleHead("详情")
						.addOperate(
							c_Index_Module_Edit_EditAccess_EditAccess_Operate
								.defaultComment("编辑")
								.defaultTarget(com.sh_lianjing.spring.web.controller.base.operate.OperateTarget.Popup)
						)
						.addOperate(
							c_Index_Module_Product_AddProduct_PageAccess_PageAccess_Operate
								.defaultComment("添加产品")
								.defaultTarget(com.sh_lianjing.spring.web.controller.base.operate.OperateTarget.Popup)
						)
						.addOperate(
							c_Index_Module_Image_AddImage_FileUpload_FileUpload_Operate
								.defaultComment("添加图片")
						)
						.addOperate(
							c_Index_Module_Delete_Delete_Delete_Operate
								.defaultComment("删除")
						)
						.addOperate(
							c_Index_Module_Publish_Submit_Submit_Operate
								.defaultComment("发布")
						)
						.addOperate(
							c_Index_Module_Up_Submit_Submit_Operate
								.defaultComment("上架")
						)
						.addOperate(
							c_Index_Module_Down_Submit_Submit_Operate
								.defaultComment("下架")
						)
					, 
					new InfoModuleBody(
								bean
							,
							new OutputBeanGroup(
									OutputWay.Vertical, 
									OutputData.info()
								)
						)
				);
	}
	
	/**
	 * 输出信息
	 */
	private static class OutputData {
	
		private static final OutputBean[] info() {
			OutputData outputData = new OutputData();
			return new OutputBean[]{
						outputData.getType(),
						outputData.getName(),
						outputData.getComment(),
						outputData.getOrderValue(),
						outputData.getTopFlag(),
						outputData.getPageFlag(),
						outputData.getCreateTime(),
						outputData.getModifyTime(),
						outputData.getState(),
				};
		}
	
		OutputBean getType(){
			return new OutputBean("type", "类型", true, DataDisplay.Show, DataType.Enum, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getName(){
			return new OutputBean("name", "名称", true, DataDisplay.Show, DataType.String, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getComment(){
			return new OutputBean("comment", "说明", true, DataDisplay.Show, DataType.String, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getOrderValue(){
			return new OutputBean("orderValue", "排序值", true, DataDisplay.Show, DataType.Integer, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getTopFlag(){
			return new OutputBean("topFlag", "置顶标志", true, DataDisplay.Show, DataType.Boolean, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getPageFlag(){
			return new OutputBean("pageFlag", "分页标志", true, DataDisplay.Show, DataType.Boolean, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getCreateTime(){
			return new OutputBean("createTime", "创建时间", true, DataDisplay.Show, DataType.Date, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getModifyTime(){
			return new OutputBean("modifyTime", "修改时间", true, DataDisplay.Show, DataType.Date, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
		OutputBean getState(){
			return new OutputBean("state", "状态", true, DataDisplay.Show, DataType.Enum, new OutputType[]{OutputType.Ajax, OutputType.Excel, }, "yy/MM/dd HH:mm:ss");
		}
	}
	
	
	
	
	/**
	 * 输出模型
	 */
	

}
